C. A Solidity file can have libraries

D. All of the above

Q18: Why are events useful?

A. They work like functions where we can write business logic

B. They function like libraries that we can use like utilities

C. They can log messages that are useful for debugging

D. They can trigger call back functions in frontend conveying the

status of the transactions

Q19: If we write some code in the constructor, when would it be

executed?

A. As soon as the contract is created

B. When the contract is destroyed to release the resources

C. Every time and just before any of the function is called

D. Every time and just after any of the function is called

Q20: Which of the following is correct?

A. A constructor in the Solidity file is optional

B. A Solidity file can have many constructors by overloading

C. A constructor can be private

D. None of the above

Q21: Which of the return syntaxes are correct regarding a return

statement in a Solidity function?

A. return var;

B. return (7, true, 2);

C. A function might have no return statement

D. All of the above

Q22: What is the issue with the following code?

// SPDX-License-Identifier: SOME IDENTIFIER

pragma solidity ^0.8.10;